<template>
  <div class="wholeView">
    <el-table :data="tableData" border v-loading="tableLoading" :header-cell-style="{
                background: '#0070C0',
                color: '#ffffff'
            }" style="width: 100%">
      <el-table-column v-for="(item,index) in headerData" :key="index" :prop="keyData[index]" align="center" :label="item"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import $barCodeApi from "@/api/barCode/index";
export default {
  name: "wholeView",
  components: {

  },
  props: {
    form: {
      type: Object,
      default: {}
    }
  },
  data () {
    return {
      tableLoading: false,
      tableData: [],
      headerData: [],
      keyData: []
    };
  },
  created () { },
  mounted () { },
  methods: {
    getList () {
      this.tableData = [];
      this.tableLoading = true;
      let obj = Object.assign({}, this.form);
      $barCodeApi.getRegionalIncome({ ...obj }, res => {
        if (res.code == 0) {
          this.tableLoading = false;
          this.tableData = res.content.data;
          this.headerData = res.content.name;
          this.keyData = res.content.key
        }
      });
    },
  }
};
</script>

<style scoped>
.area {
  color: #1890ff;
  cursor: pointer;
}
.breadcrumb {
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.breadItem {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.breadItem > div {
  margin-right: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
}
.breadItem > p {
  padding: 0 10px;
  margin: 0;
}
.breadItem div:hover {
  color: #1890ff;
}
</style>
